String  inputString = "";        
boolean stringComplete = false; 
char  startString=0xFA;
char  endString=0xAF;

#define MSG_DATA_LENTH 10

#define APC250Serial Serial3
#define DebugSerial Serial

typedef struct
{
	byte sysState;
	byte watchDevice;
	byte iH;
	byte iL;
	byte vH;
	byte vL;
	byte factH;
	byte factL;
	int i;
	int v;
	int fact;
}MsgData;

MsgData currentMsgData;

void setup() {
  // put your setup code here, to run once:
  APC250Serial.begin(9600);
  DebugSerial.begin(9600);
    // reserve 200 bytes for the inputString:
  inputString.reserve(200);
  DebugSerial.println("hello");
}

void loop() {
  // put your main code here, to run repeatedly:
  if (stringComplete) 
  {
	DebugSerial.println("begin parse");
    //Serial.println(inputString);
    if(inputString[0]==startString && inputString.length()==MSG_DATA_LENTH)
	{
		currentMsgData.sysState=inputString[1];
		currentMsgData.watchDevice=inputString[2];
		currentMsgData.iH=inputString[3];
		currentMsgData.iL=inputString[4];
		currentMsgData.vH=inputString[5];
		currentMsgData.vL=inputString[6];
		currentMsgData.factH=inputString[7];
		currentMsgData.factL=inputString[8];
		currentMsgData.i=(int(currentMsgData.iH)<<8)+int(currentMsgData.iL);
		currentMsgData.v=(int(currentMsgData.vH)<<8)+int(currentMsgData.vL);
		currentMsgData.fact=(int(currentMsgData.factH)<<8)+int(currentMsgData.factL);
		PrintMsgData(currentMsgData);
		//液晶屏幕显示加这个下面
		ShowInLcd(currentMsgData);
	}
	inputString = "";
    stringComplete = false;
  }
}

void ShowInLcd(MsgData msg)
{
	//你们的工作，用5510，显示上述值
}

void PrintMsgData(MsgData msg)
{
	DebugSerial.println(msg.sysState,HEX);
	DebugSerial.println(msg.watchDevice,HEX);
	DebugSerial.println(msg.iH,HEX);
	DebugSerial.println(msg.iL,HEX);
	DebugSerial.println(msg.vH,HEX);
	DebugSerial.println(msg.vL,HEX);
	DebugSerial.println(msg.factH,HEX);
	DebugSerial.println(msg.factL,HEX);
	DebugSerial.println(msg.i);
	DebugSerial.println(msg.v);
	DebugSerial.println(msg.fact);	
}

void serialEvent3() {
  while (APC250Serial.available()) {
    char inChar = (char)APC250Serial.read();	
	inputString += inChar;
    // check end code
    if (inChar == endString) {
      stringComplete = true;
    }
  }
}
